package com.qf.domain;

import java.util.List;

/**
 * @author Administrator
 * @version v1.0
 * @date 2022/4/19
 */
public class PageBean {
    //当前页码
    private int pageNum;
    //每页条数
    private int pageSize;
    //总条数
    private long totalCount;
    //总页数
    private int totalPage;
    //要展示的数据
    private List data;

    private int startPage=1;

    private int endPage;


    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public long getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(long totalCount) {
        this.totalCount = totalCount;
    }

    public int getTotalPage() {
        this.totalPage = (int)Math.ceil(totalCount*1.0/pageSize);
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public List getData() {
        return data;
    }

    public void setData(List data) {
        this.data = data;
    }

    public int getStartPage() {
        return startPage;
    }

    public void setStartPage(int startPage) {
        this.startPage = startPage;
    }

    public int getEndPage() {
        this.endPage =(int)Math.ceil(totalCount*1.0/pageSize);
        return endPage;
    }

    public void setEndPage(int endPage) {
        this.endPage = endPage;
    }



}
